home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
PCW_C.ARJ
/
DEMO_E.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-28
|
1KB
|
36 lines
/***************************************************************/
/* File Id. DEMO_E.C. */
/* Author. Stan Milam. */
/* */
/* This demo function will open a window and scroll its con- */
/* tents until a MOUSE or KEYBOARD key is pressed. */
/* */
/***************************************************************/
#include <stdio.h>
#include <pcwproto.h>
int demo_e(void) {
WNDPTR *wnd;
int i,ch;
if ( mpresent ) hide_mouse();
setborder(SINGLEALL);
bordercolor(WHITE,GREEN);
titlecolor(WHITE,RED);
wnd = wexplode(6,20,18,60,WHITE,GREEN);
wtitle(wnd, TOP,LEFT, " Window Scrolling ");
for (i=3;i<8;i++)
wprints(wnd,i,CENTER,BLUE,GREEN," A sample window scrolling ");
do {
rest(9);
wscroll(wnd,1,3);
rest(9);
wscroll(wnd,1,-3);
} while ((ch = keypressed()) == 0);
if ( ch != 3 ) keybrd_flush();
wnd = wpop( wnd );
return 0;
}